package com.roadjava.rbac.controller;

import com.roadjava.rbac.bean.res.Result;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/apis")
public class CommentController {

    @PostMapping("/submitComment")
    public ResponseEntity<Result<String>> submitComment(@RequestParam String comment) {
        // 这里通常会保存到数据库，但为了测试，我们直接返回
        Result<String> result = Result.buildFailure("您的评论: " + comment);
        return ResponseEntity.ok(result);
    }
}
